﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="User.aspx.cs" Inherits="Customer_User"  MasterPageFile="../MasterPage.master" %>
<%@ OutputCache Duration="2" SqlDependency="CIM.Net:Dat_Stock" VaryByParam="none" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="Common" %>
<%@ Import Namespace="DAL" %>

<%@ Register src="Customer_Left.ascx" tagname="Customer_Left" tagprefix="uc2" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="0" cellspacing="2" width="100%" border="0">
	<tr>
        <td class="leftTd"  valign="top" width="20%">
            
            <uc2:Customer_Left ID="Customer_Left1" runat="server" />
        </td>
		<td width="80%" valign="top">
		<table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
			<tr>
		        <td class="leftTd"  valign="top">
		        <table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
		        	<tr>
		            	<td class="titleStyle"><%= WebUtility.GetTitleByMenu(MenuType) %></td>
		            </tr>
		        </table>
		         <br />
                <table width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
	                <tr>
		                <td style="height: 30px;" class="banma22_1">&nbsp;真实姓名：<asp:TextBox ID="RealName" 
                                runat="server" Width="60px" CssClass="face"></asp:TextBox>&nbsp;&nbsp;关键字：<asp:TextBox ID="Keyword" runat="server" Width="60px" CssClass="face"></asp:TextBox>&nbsp;&nbsp;
	                        &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="submit" runat="server" Text=" 搜 索 " CssClass="button" 
                                onclick="submit_Click" />&nbsp;
                            <asp:Button ID="submit0" runat="server" Text=" 导 出 " CssClass="button" 
                                onclick="submit0_Click"  />
		                </td>
	                </tr>
                    </table><br/>
                    <asp:ListView ID="lv_User" runat="server" ondatabound="lv_User_DataBound" 
                        DataKeyNames="UserKey" onitemdeleting="lv_User_ItemDeleting" >
                       <LayoutTemplate>
                            <table id="table1"  runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                              <tr>
                                <td style="height: 25px; width: 5%;" class="banma1 TextCenters">序号</td>
                                <td style="height: 25px; width: 10%;" class="banma1 TextCenters">用户类型</td>
                                <td style="height: 25px; width: 10%;" class="banma1 TextCenters">用户名</td>
                                <td style="height: 25px; width: 15%;" class="banma1 TextCenters">所在公司</td>
                                <td style="height: 25px; width: 10%;" class="banma1 TextCenters">公司简称</td>
		                        <td style="height: 25px; width: 10%;" class="banma1 TextCenters">真实姓名</td>
		                        <td style="height: 25px; width: 10%;" class="banma1 TextCenters">客户类型</td>
		                        <td style="height: 25px; width: 10%;" class="banma1 TextCenters">合同状态</td>
	                          </tr>
                              <tr id="itemPlaceholder" runat="server" ></tr><br />
                            </table>
                       </LayoutTemplate>
                       <ItemTemplate>
                           <tr>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Container.DataItemIndex+1 %></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Account.GetAccountType(Eval("UserType"))%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;">
                            <a class="thickbox" href="../System/User_View.aspx?UserKey=<%# Eval("UserKey") %>&KeepThis=true&TB_iframe=true&height=450&width=650"><%# Eval("Account")%></a></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("CompanyName")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("ShortCompanyName")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("RealName")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("CustomerType")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;">
                            <a class="thickbox" href="../System/User_View.aspx?UserKey=<%# Eval("UserKey") %>&KeepThis=true&TB_iframe=true&height=450&width=650"><%# Eval("ContractNO")%></a></td>
	                       </tr> 
                      </ItemTemplate>
                       <AlternatingItemTemplate>
                           <tr>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Container.DataItemIndex+1 %></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Account.GetAccountType(Eval("UserType"))%></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;">
                            <a class="thickbox" href="../System/User_View.aspx?UserKey=<%# Eval("UserKey") %>&KeepThis=true&TB_iframe=true&height=450&width=650"><%# Eval("Account")%></a></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("CompanyName")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("ShortCompanyName")%></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("RealName")%></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("CustomerType")%></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;">
                            <a class="thickbox" href="../System/User_View.aspx?UserKey=<%# Eval("UserKey") %>&KeepThis=true&TB_iframe=true&height=450&width=650"><%# Eval("ContractNO")%></a></td>
	                       </tr> 
                      </AlternatingItemTemplate>
                      
	                  </asp:ListView>
	                   <!-- Page Begin --><asp:DataPager ID="DataPager1" runat="server" PagedControlID="lv_User" PageSize="20">
                                   <Fields>
                                    <asp:TemplatePagerField>
                                         <PagerTemplate>
                              
                              <table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
                                <tr>
                                    <td width="36%" height="30">
                                        页次：<b><%# WebUtility.GetCurrentPage(Container.StartRowIndex, Container.PageSize)%></b>/<b><%# WebUtility.GetTotalPage(Container.TotalRowCount, Container.PageSize)%></b>页 
                                        每页<b><%# Container.PageSize  %></b>条 共<b><%# Container.TotalRowCount %></b>条
                                    </td>
                                    <td width="64%" height="30" style="text-align: right;">
                                        分页：
                                        </PagerTemplate>
                                     </asp:TemplatePagerField>
                                     <asp:NextPreviousPagerField ButtonType="Image" FirstPageImageUrl="../images/first.gif" ShowFirstPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" />
                                     <asp:NumericPagerField CurrentPageLabelCssClass="SelectedPage" NumericButtonCssClass="NotSelectedPage" />
                                     <asp:NextPreviousPagerField ButtonType="Image" LastPageImageUrl="../images/last.gif"  ShowLastPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" />
                                     <asp:TemplatePagerField>
                                        <PagerTemplate>
                                               转到：
                                            <asp:DropDownList ID="PageList" runat="server" AutoPostBack="true" 
                                                onselectedindexchanged="PageList_SelectedIndexChanged" >
                                            </asp:DropDownList>
                                                </td>
                                            </tr>
                                        </table>
                                         </PagerTemplate>
                                     </asp:TemplatePagerField>
                                   </Fields>
                        </asp:DataPager>
                        <!-- Page End -->
                    
        </td>
    </tr>
</table>
</asp:Content>

